<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>个人信息</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <!--标准mui.css-->
    <link rel="stylesheet" href="../css/mui.min.css">

    <!--App自定义的css-->
    <!--<link rel="stylesheet" type="text/css" href="../css/app.css"/>-->
    <style>
        li{ list-style:none; }
        .mui-input-row label{width: 100%;font-size: 15px;}
        .mui-input-group .mui-input-row{
            height: 32px;
        }
        label{
            width: 80%!important;
            font-size: 12px!important;
            font-family:Microsoft YaHei,sans-serif;
            font-weight: normal;
        }
    </style>

</head>
<body>
<div class="mui-content" style="margin-top: 3px;"> 
    <div class="headage"></div>           
    <form class="mui-input-group" style="margin-top: -50px;">
        <div class="mui-input-row ">
            <label >姓名：<span id="username"></span></label>
        </div>
<!--        <div class="mui-input-row ">-->
<!--            <label style="">注册时间：<span id="createtime"></span></label>-->
<!--        </div>-->
        <div class="mui-input-row ">
            <label >手机：<span id="mobile" ></span></label>
        </div>
        <div class="mui-input-row ">
            <label>地址：<span id="address"></span></label>
        </div>
<!--        <div class="mui-input-row ">-->
<!--            <label>上级经纪人姓名：<span id="upusername"></span></label>-->
<!--        </div>-->
<!--        <div class="mui-input-row ">-->
<!--            <label>上级经纪人联系电话：<span id="upmobile"></span></label>-->
<!--        </div>-->
<!--        <div class="mui-input-row ">-->
<!--            <label>上级经纪人地址：<span id="upaddress"></span></label>-->
<!--        </div>-->
    </form>
    <a  class="mui-btn mui-btn-primary"  href="userdetailsedit.html" style="height: 40px;margin-top: 5px;color: #FFF;width: 100%">修改</a>
    <div class="footerpage">
    </div>
</div>

</body>

<script src="../js/mui.min.js"></script>
<script src="../js/practise/push.js"></script>
<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/getUrlParam.js"></script>
<script src="../js/cookieutil.js" type="text/javascript" charset="utf-8"></script>
<script>
    var userid=getCookie('userid');
    function getuser(){
        mui.post('/User/findByid',
            {
                id:userid
            },
            function(data){
                console.log(data);
                if (data.code&&data.object!=null){
                    var  item=data.object;
                    var username = document.getElementById("username");
                    username.innerHTML =item.username;//改变内容

                    // var time = document.getElementById("createtime");
                    // time.innerHTML =formattimeuser(item.createtime);//改变内容

                    var mobile = document.getElementById("mobile");
                    mobile.innerHTML =item.mobile;//改变内容

                    var address = document.getElementById("address");
                    address.innerHTML =item.address;//改变内容
                    // if (item.upopenid!=null&&item.upopenid!=""&&item.upopenid!=undefined){
                    //     getUpuser(item.upopenid);
                    // }
                }
            },'json'
        );
    }
    function getUpuser(obj){
        mui.post('/User/findByid',
            {
                id:obj
            },
            function(data){
                console.log(data);
                if (data.code&&data.object!=null){
                    var  item=data.object;

                    var upusername = document.getElementById("upusername");
                    upusername.innerHTML =item.username;//改变内容



                    var upmobile = document.getElementById("upmobile");
                    upmobile.innerHTML =item.mobile;//改变内容

                    var upaddress = document.getElementById("upaddress");
                    upaddress.innerHTML =item.address;//改变内容

                }
            },'json'
        );
    }
    $(function(){
        /*公共部分
         * 导航栏
         * footer CopyRight
         */
        getuser();
        $(".headage").load("head.html");
        $(".footerpage").load("footer.html");
    });
</script>
</html>